<template>
  <!--  组件的结构-->
  <div class="demo">
    <h2 @click="showName">学生姓名：{{ name | mySlice}}</h2>
    <h2>学校地址：{{ address }}</h2>
    <input type="text" v-fbind:value="name">
  </div>
</template>

<script>
// 组件交互相关的代码(数据、方法等等)
import {mixin} from '../../js/mixin.js'

export default {
  name: 'School',
  data() {
    return {
      name: '尚硅谷465456',
      address: '北京昌平'
    }
  },
  mixins: [mixin]
}
</script>

<style>
/*组件的样式*/
.demo {
  background-color: orange;
}
</style>